﻿-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[CalcDisponibilAB]
	@CodUnitate smallint,
	@IDAB int
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

	UPDATE [AngajamentBugetarDetaliu] SET [Clasif]=LTRIM(RTRIM(j.[Codificare]))+'.' +dbo.GetTitlu([ArtAl])+'.' + LTRIM(RTRIM([ArtAl]))  FROM [Jurnale] j WHERE j.[IDJurnal] = [AngajamentBugetarDetaliu] .[IDJurnal] AND [IDAB] =@IDAB
END